package individual.ircon.bilibili.ui;

import javafx.beans.property.LongProperty;
import javafx.beans.property.SimpleLongProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 * 给数据表格用的用户弹幕信息的Bean。
 */
public class DanmuData {
    private final LongProperty UserID = new SimpleLongProperty();
    private final StringProperty UserName = new SimpleStringProperty();
    private final StringProperty Danmu = new SimpleStringProperty();

    /**
     * 用户信息的构造函数。
     * @param id 用户ID。
     * @param name 用户昵称。
     * @param danmu 弹幕内容
     */
    public DanmuData(long id, String name, String danmu) {
        UserID.set(id);
        UserName.set(name);
        Danmu.set(danmu);
    }

    public long getUserID() {
        return UserID.get();
    }

    public LongProperty userIDProperty() {
        return UserID;
    }

    public void setUserID(long userID) {
        this.UserID.set(userID);
    }

    public String getUserName() {
        return UserName.get();
    }

    public StringProperty userNameProperty() {
        return UserName;
    }

    public void setUserName(String userName) {
        this.UserName.set(userName);
    }

    public String getDanmu() {
        return Danmu.get();
    }

    public StringProperty danmuProperty() {
        return Danmu;
    }

    public void setDanmu(String danmu) {
        this.Danmu.set(danmu);
    }
}
